/*
  学习目标：配置Redux调试工具
  步骤：
     1. 下包 redux-devtools-extension
     
     3. 浏览器安装插件
     4. 重启浏览器和项目
*/
import { applyMiddleware, legacy_createStore as createStore } from 'redux';
import thunk from 'redux-thunk';
import rootReducer from './reducer';
import { composeWithDevTools } from 'redux-devtools-extension';

const store = createStore(
  rootReducer,
  // 2. 配置调试工具:  工具包住应用, 应用包住中间件
  composeWithDevTools(applyMiddleware(thunk))
);

export default store;
